<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<script type="text/javascript" src="scripts/boot.js"></script>
	<style type="text/css">
	    .asLabel .mini-textbox-border,
	    .asLabel .mini-textbox-input,
	    .asLabel .mini-buttonedit-border,
	    .asLabel .mini-buttonedit-input,
	    .asLabel .mini-textboxlist-border
	    .asLabel .mini-textarea-border
	    .asLabel .mini-combobox-border
	    .asLabel .mini-buttonedit-border
	    {
	        border:0;background:none;cursor:default;
	    }
	    .asLabel .mini-buttonedit-button,
	    .asLabel .mini-textboxlist-close
	    {
	        display:none;
	    }
	    .asLabel .mini-textboxlist-item
	    {
	        padding-right:8px;
	    } 
	    .tdtop {vertical-align: text-top;}   
    </style>
</head>
<body>
	<fieldset style="width:96%;height:auto;solid 1px #aaa;position:relative;top: 10;">
	    <legend >药品信息</legend>
	    <div style="padding-left:50px;padding-bottom:5px;">
		<form id="form1" method="post">
	        <table style="table-layout:fixed;" borderStyle="false" cellpadding="3">
	        	<tr>
            		<td>药品编号：</td>
                    <td><input name="serialNum" class="mini-textbox asLabel" readonly="readonly" /></td>
                    <td>药品名称：</td>
                    <td><input name="name" class="mini-textbox asLabel" readonly="readonly" /></td>
                </tr>
               <tr>
            		<td>别名：</td>
                    <td><input name="aliases" class="mini-textbox asLabel" readonly="readonly" /></td>
                    <td>生产厂家：</td>
                    <td><input name="manufacturer" class="mini-textbox asLabel" readonly="readonly" /></td>
                </tr>
                <tr>
            		<td>有效期：</td>
                    <td><input name="valid" class="mini-textbox asLabel" readonly="readonly" /></td>
                    <td>类别：</td>
                    <td><input id="btnEdit1" name="medicineSortId" class="mini-buttonedit asLabel" errorMode="none" readonly="readonly"/></td>
                </tr>
                <tr>
            		<td>单位：</td>
                    <td><input name="unit" id="medicine_unit" class="mini-combobox asLabel" errorMode="none" readonly="readonly" valueField="keyName" textField="keyValue"
                     url="dictionary_wm_key_val_view.do?typeName=MEDICINE_UNIT_TYPE" /></td>
                    <td>价格：</td>
                    <td><input name="price" class="mini-textbox asLabel" readonly="readonly" /></td>
                </tr>
                <tr>
            		<td>更新时间：</td>
                    <td><input name="updateTime" class="mini-textbox asLabel" readonly="readonly" style="width: 150px"/></td>
                    <td>创建时间：</td>
                    <td><input name="createTime" class="mini-textbox asLabel" readonly="readonly" style="width: 150px"/></td>
                </tr>
                <tr>
                    <td>操作人：</td>
                    <td colspan="3"><input id="opUnser" class="mini-textbox asLabel" readonly="readonly" /></td>
                </tr>
                <tr>
                    <td class="tdtop">适应症：</td>
                    <td colspan="3">
                        <input name="indications" class="mini-textarea asLabel" vtype="maxLength:255" readonly="readonly" style="width:480px;" />
                    </td>
                </tr>
                <tr>
                    <td class="tdtop">用法用量：</td>
                    <td colspan="3">    
                        <input name="dosage" class="mini-textarea asLabel" vtype="maxLength:255" readonly="readonly" style="width:480px;" />
                    </td>
                </tr>
                <tr>
                    <td class="tdtop">主要成分：</td>
                    <td colspan="3">
                        <input name="mainIngredient" class="mini-textarea asLabel" vtype="maxLength:255" readonly="readonly" style="width:480px;" />
                    </td>
                </tr>
                <tr>
                    <td class="tdtop">禁忌：</td>
                    <td colspan="3">
                        <input name="avoid" class="mini-textarea asLabel" vtype="maxLength:500" readonly="readonly" style="width:480px;" />
                    </td>
                </tr>
            </table>
    	</form>
    	</div>
    </fieldset>
    <div style="text-align:center; padding-top:20px;">               
         <a class="mini-button" onclick="onCancel" style="width:60px;margin-right:50px;">关闭</a>       
    </div> 

<script type="text/javascript">
mini.parse();

var form = new mini.Form("form1");

//标准方法接口定义
function SetData(data) {
    if (data.action == "see") {
        //跨页面传递的数据对象，克隆后才可以安全使用
        data = mini.clone(data);
        $.ajax({
  	    	url: "medicine_find.do?id="+data.row.id,
  	    	dataType: 'json',
  	        cache: false,
	    	async: false,
 	        success: function (text) {
           		data = text.result;
	            form.setData(data);
	            form.setChanged(false);
	            mini.getbyName("medicineSortId").setText(data.medicineSortName);
	            mini.get("opUnser").setValue(data.userName);
 	        }
  	    });
    }
}

function GetData() {
    var o = form.getData();
    return o;
}

function CloseWindow(action) {            
    if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
    else window.close();            
}

function onCancel(e) {
    CloseWindow("cancel");
}
</script>
</body>
</html>